FROM ubuntu
RUN echo "\
server {\
    listen   80; ## listen for ipv4; this line is default and implied\
    listen   [::]:80 default ipv6only=on; ## listen for ipv6\
    root /usr/share/nginx/privateDockerUser/public;\
    index index.php index.html index.htm;\
    error_log /dev/stdout info;\
    access_log /dev/stdout;\
    gzip on;\
    gzip_min_length 10240;\
    gzip_proxied expired no-cache no-store private auth;\
    gzip_types text/plain text/css text/xml application/json text/javascript application/x-javascript application/xml;\
    location / {\
        # First attempt to serve request as file, then
        # as directory, then fall back to index.php
        try_files $uri $uri/ /index.php?$query_string;\
    }\
    client_max_body_size 50m;\
    location ~ \.php$ {\
        root /usr/share/nginx/privateDockerUser/public;\
        fastcgi_split_path_info ^(.+\.php)(/.+)$;\
        fastcgi_pass 127.0.0.1:9000;\
        fastcgi_index index.php;\
        include fastcgi_params;\
        fastcgi_buffer_size 128k;\
        fastcgi_buffers 4 256k;\
        fastcgi_busy_buffers_size 256k;\
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\
        fastcgi_param HTTP_MERGED_X_FORWARDED_FOR $http_x_forwarded_for;\
        fastcgi_param PATH_INFO $fastcgi_path_info;\
    }\
        location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {\
                expires           5d;\
        }\
}\
">1.txt
WORKDIR /the/workdir/path